import service from "./index";

// 按需导出
// 页数
export function majorpagecount(data) {
    return service({
        url: "/admin/major/page/count",
        method: "get",
        params: data
    })
}


// 列表
export function majorpage(data, page) {
    return service({
        url: "/admin/major/page/" + page,
        method: "get",
        params: data
    })
}

// 选择框
export function departmentnames(data) {
    return service({
        url: "/admin/department/names",
        method: "get",
        params: data
    })
}

// 增加
export function major(data) {
    return service({
        url: "/admin/major",
        method: "post",
        data: data
    })
}

// 详情
export function adminmajorid(id) {
    return service({
        url: `/admin/major/ ` + id,
        method: "get",
    })
}

// 修改
export function adminmajor(data) {
    return service({
        url: `/admin/major/`,
        method: "put",
        data: data
    })
}

// 删除
export function majordel(id) {
    return service({
        url: `/admin/major/` + id,
        method: "DELETE",
    })
}
